package com.test.VT.CreateVT;

import com.test.VT.Thread.CustomThread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 创建虚拟线程
 * @author caoqianfan
 * @date 2024/9/27 14:09
 */
public class By_Executors {
    public static void main(String[] args) {
        CustomThread customThread = new CustomThread();
        ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor();
        executor.submit(customThread);
    }
}
